package pessoas.view;

import javax.swing.JMenuItem;

public class MainView extends javax.swing.JFrame {

    /**
     * Creates new form MainView
     */
    public MainView() {
        initComponents();
        this.setLocationRelativeTo(this.getParent());
    }

    public JMenuItem getItemMenuAdicionar() {
        return itemMenuAdicionar;
    }

    public JMenuItem getItemMenuListar() {
        return itemMenuListar;
    }

    public JMenuItem getItemMenuSair() {
        return itemMenuSair;
    }

    public JMenuItem getItemMenuImportar() {
        return itemMenuImportar;
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        itemMenuAdicionar = new javax.swing.JMenuItem();
        itemMenuListar = new javax.swing.JMenuItem();
        itemMenuImportar = new javax.swing.JMenuItem();
        itemMenuSair = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Cadastro de pessoas");

        jLabel1.setFont(new java.awt.Font("Tahoma", 3, 48)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(102, 102, 102));
        jLabel1.setText("                             Agenda de Contatos");

        jMenu1.setText("Opções");
        jMenu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu1ActionPerformed(evt);
            }
        });

        itemMenuAdicionar.setText("Adicionar");
        itemMenuAdicionar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuAdicionarActionPerformed(evt);
            }
        });
        jMenu1.add(itemMenuAdicionar);

        itemMenuListar.setText("Listar pessoas");
        itemMenuListar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuListarActionPerformed(evt);
            }
        });
        jMenu1.add(itemMenuListar);

        itemMenuImportar.setText("Importar Pessoas");
        itemMenuImportar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuImportarActionPerformed(evt);
            }
        });
        jMenu1.add(itemMenuImportar);

        itemMenuSair.setText("Sair");
        itemMenuSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuSairActionPerformed(evt);
            }
        });
        jMenu1.add(itemMenuSair);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu1ActionPerformed
    }//GEN-LAST:event_jMenu1ActionPerformed

    private void itemMenuAdicionarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuAdicionarActionPerformed
//        InclusaoPessoaPresenter presenterInclusaoPessoa = new InclusaoPessoaPresenter();
    }//GEN-LAST:event_itemMenuAdicionarActionPerformed

    private void itemMenuListarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuListarActionPerformed
//        ListaPessoasPresenter listaPessoas = new ListaPessoasPresenter();
    }//GEN-LAST:event_itemMenuListarActionPerformed

    private void itemMenuSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuSairActionPerformed
        // TODO add your handling code here:
//        this.setVisible(false);
//        this.dispose();
    }//GEN-LAST:event_itemMenuSairActionPerformed

    private void itemMenuImportarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuImportarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_itemMenuImportarActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            @Override
//            public void run() {
//                new MainView().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem itemMenuAdicionar;
    private javax.swing.JMenuItem itemMenuImportar;
    private javax.swing.JMenuItem itemMenuListar;
    private javax.swing.JMenuItem itemMenuSair;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    // End of variables declaration//GEN-END:variables
}
